In WordPress plugin and theme development often need to get a variety of URL path, WordPress provides the following centralized method to obtain the URL path:Plugins_url ()-the URL of the plugin directory (for example: Http://www.hujuntao.com/wp-content/plugins)Includes_url () URL of the-includes directory (for example: Http://www.hujuntao.com/wp-includes)Content_url () URL of the-content directory (for exa
message, reply template
Searchform.php is a search form template, which is the search box we see
Search.php is a search results template
404.php is the error page template
Author.php is an article directory page that lists an author's article
functions.php is a template function that holds the function modules used in the theme
Attachment.php is the Attachment template page.
It is necessary to note that WordPress pictures or other uploaded files wil
over the link, the browser's status bar should display http: // localhost/WordPress. Click this link now, And it will let us return to the home page. The page may still be the same, but using # or http: // localhost/WordPress as the link address is completely different. We will learn the difference between them in the next course. What happened just now? We changed the website name to a link and linked it
a category pageSingle_cat_title ();echo "-";Bloginfo (' name ');ElseIf (Is_single () | | | is_page ()) {//Is_single () returns True when the current page is a single story page. Is_page () returns True when the current page is a single pageSingle_post_title ();ElseIf (Is_search ()) {//Is_search () returns True when the current page is a search pageecho "Search results";echo "-";Bloginfo (' name ');ElseIf (
%/% monthnum %/% day %/hour postname+.htmlFor example, Permalinks In the "/2007/03/post-name/" directory structure (WordPress.org blog):/% year %/% monthnum %/% postname %/Permalinks, similar to the "/2007/03/post-name.html" directory structure (example: Blogger, TypePad):/% year %/% monthnum %/invalid postname.html .htmlPermalinks, similar to the "/123.html" directory structure (for example, livejournal and Baidu space), is written in the format of/define post_id1_.html.My "/category/post-name
How to define index.php and how to derive other files, in the index.php file, within the BODY element, create a new structured markup element with a different id attribute for each element:these different attributes, respectively, represent different areas, so that people can see what the meaning of, the following we focus on the construction of the header,content,sidebar,footer part. (i). Building the headerEnter the following code between the two tags of the element:this uses the WP built-in
short link 301 to the alias link. So how to set it? You only need to find the header. php In the template and add the following code to the header.
If ($ _ GET ['P'] | $ _ GET ['page _ id']) {
If ($ _ GET ['P']) $ id = $ _ GET ['P'];
If ($ _ GET ['page _ id']) $ id = $ _ GET ['page _ id'];
$ Post = get_post ($ id );
$ Name = $ post-> post_name;
Header ('HTTP/1.1 301 Moved Permanently '); // issue the 301 header
Header ('location: '. bloginfo ('url
use the WordPress plug-in system to define your personal template. This advanced feature can be implemented through the template_redirect action hook. For more information about creating a plug-in, see plug-in API.Contains template filesTo load other templates (except header, sidebar, footer, which have been pre-defined to load commands such as get_header () to a template, you can use get_template_part (). This facilitates the reuse of theme code.Ref
As my PHP website has more and more visits to blog development and more comments, Wordpress has more and more visits to blog development and comments as Wordpress does not have the filtering function, wordpress spam comments are getting more and more spam comments because Wordpress messages do not have the filtering fu
PHP version upgrade to 7.x after some of WordPress's changes and WordPress skills,
I do not know the hands of the cheap, the VPS server PHP upgrade to 7.0, although 7.x and previous compatibility is very high, but removed a lot of outdated usage, and some old applications are still in use. To the personal WordPress site errors, corrections recorded as follows. All is plugin,
Label: Or, colleague. Need to help her print it out SQL debug output to page SQL Here we use plugins or a way to start the config file wordpress debug Create a new file in the Plugins folder wordpress/wp-content/plugins/called bt_debug_sql.php The function here is only to make WordPress savequeries static variable set to True, so you can also not, directly i
It's not the latest, but it should be enough!
The difference is that the Chinese version of the download here does not know why there is a direct wp-config.php
1, what is WordPress?
WordPress is based on PHP and MySQL blog software, through it can quickly and easily build your own blog platform, the latest version is 1.5.1.2 version, version code is "Strayhorn". Can I have a look at my http://www.nieqiang.
As WordPress is transformed from a blog system to a CMS system, with unlimited resources, personalized themes, and plug-ins available for users to choose from, more and more domestic users begin to use WordPress to build their own blogs and CMS sites, even enterprise sites. However, building a website is not as easy as you think. Are your sites frequently backed up and configured for security? If you want t
Tags: wordpress debug SQL Debug Pluginor that colleague. This time, I need to help her print out SQL output to the page to debug SQLHere we use plug-ins or a configuration file to start the WordPress debugCreate a new file in the plugin directory wordpress/wp-content/plugins/called bt_debug_sql.phpThe function here is just to let
How to Create a wordpress topic? Friends who like theme often try new theme. Have you ever thought about making your own wordpress theme? No? The following is a tutorial for creating a wordpress topic for you ~
The following describes how to create a Wordpress topic. Or, more specifically, I will introduce the main me
15 Professional responsive WordPress Themes, professional wordpress
When you are about to create a new website, you will find many WordPress Themes for you to choose from. They are powerful and suitable. Although a large number of third-party plug-ins can solve the script problem, this time we will introduce you to some theme that is completely different from th
Using Dropbox to back up WordPress is a pretty good idea. Dropbox is a network and different computers to synchronize data between the software, at present, the new user registration Dropbox can get 2GB size of storage space, if the upgrade to the toll users, space capacity will be greater, will receive more services and support. However, for me and other ordinary bloggers using WordPress, the main backup s
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.